package com.lw.dto;

/**
 * Created by IntelliJ IDEA
 *
 * @Author L1W31
 * @Date 2021/8/3 20:33
 * @Version 1.0
 * @Description 暴露秒杀地址(接口)DTO
 */
public class Exposer {

    // 是否开启秒杀
    private boolean exposed;

    // MD5加密
    private String md5;

    // id
    private long secKillId;

    // 系统当前时间（毫秒）
    private long now;

    // 秒杀开启时间
    private long start;

    // 秒杀结束时间
    private long end;

    /**
    * @Description: 秒杀正在进行的构造方法
    * @Param: [exposed, md5, secKillId]
    * @return:
    */
    public Exposer(boolean exposed, String md5, long secKillId) {
        this.exposed = exposed;
        this.md5 = md5;
        this.secKillId = secKillId;
    }

    /**
    * @Description: 秒杀未开始或者秒杀已经结束的构造方法
    * @Param: [exposed, now, start, end]
    * @return:
    */
    public Exposer(boolean exposed, long secKillId, long now, long start, long end) {
        this.exposed = exposed;
        this.secKillId = secKillId;
        this.now = now;
        this.start = start;
        this.end = end;
    }

    /**
    * @Description: 没有秒杀商品的构造方法
    * @Param: [exposed, secKillId]
    * @return:
    */
    public Exposer(boolean exposed, long secKillId) {
        this.exposed = exposed;
        this.secKillId = secKillId;
    }

    public boolean isExposed() {
        return exposed;
    }

    public void setExposed(boolean exposed) {
        this.exposed = exposed;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public long getSecKillId() {
        return secKillId;
    }

    public void setSecKillId(long secKillId) {
        this.secKillId = secKillId;
    }

    public long getNow() {
        return now;
    }

    public void setNow(long now) {
        this.now = now;
    }

    public long getStart() {
        return start;
    }

    public void setStart(long start) {
        this.start = start;
    }

    public long getEnd() {
        return end;
    }

    public void setEnd(long end) {
        this.end = end;
    }

    @Override
    public String toString() {
        return "Exposer{" +
                "exposed=" + exposed +
                ", md5='" + md5 + '\'' +
                ", secKillId=" + secKillId +
                ", now=" + now +
                ", start=" + start +
                ", end=" + end +
                '}';
    }
}
